package com.lagou.edu.service.impl;

import com.lagou.edu.dao.ResumeDao;
import com.lagou.edu.pojo.Resume;
import com.lagou.edu.service.ResumeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author wyx
 * @Date 2020/1/23 9:17
 */
@Service
@Transactional
public class ResumeServiceImpl implements ResumeService {
    @Autowired
    ResumeDao resumeDao;
//    @Override
//    public List<Resume> queryAccountList() throws Exception {
//        return null;
//    }

    @Override
    public List<Resume> findAll() throws Exception {

        List<Resume> list = resumeDao.findAll();
        return list;
    }

    public void deleteById(long id){
        resumeDao.deleteById(id);
    }

    public void addResume(Resume resume){
        resumeDao.save(resume);
    }

}
